<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/6/8
 * Time: 9:46
 */
include "config.php";
if(!empty($_REQUEST["usname"])){
    $username=$_REQUEST["usname"];
    $exisUserSQL = "SELECT * FROM fashionshopping.goodinfo WHERE u_name=? ";
    $stmt = $conn->prepare($exisUserSQL);
    $stmt->bind_param("s", $username);
    $stmt->execute();
    $result = $stmt->get_result();
    $arrList = Array("status" => 1, "msg" => "ok");
    $DataList = Array();
    while($row = $result->fetch_assoc()){
        // $row 就是一个对象
        array_push($DataList, $row);
    }
    $arrList["data"] = $DataList;
    print_r(json_encode($arrList));
}